home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v9n12.arc / D.BAT next >
DOS Batch File  |  1990-05-29  |  701b  |  56 lines

  1. D.BAT
  2.  
  3. @ECHO OFF
  4. REM (remove @ in the line above
  5. REM  for DOS less than 3.3)
  6. REM *
  7. REM * D.BAT
  8. REM * Dir /P with wildcards
  9. REM *
  10.  
  11. IF [%1]==[]     GOTO :Dir0
  12.  
  13. IF EXIST %1     GOTO :Dir1
  14. IF EXIST %1.*   GOTO :Dir2
  15. IF EXIST *.%1   GOTO :Dir3
  16. IF EXIST %1*.*  GOTO :Dir4
  17. IF EXIST *.%1*  GOTO :Dir5
  18. IF EXIST %1\*.* GOTO :Dir6
  19.  
  20. ECHO Sorry, no "%1" files found...
  21. GOTO :End
  22.  
  23. :Dir0
  24. Dir /P
  25. GOTO :End
  26.  
  27. :Dir1
  28. Dir /P %1
  29. IF EXIST %1.*   GOTO :Dir2
  30. GOTO :End
  31.  
  32. :Dir2
  33. Dir /P %1.*
  34. IF EXIST *.%1   GOTO :Dir3
  35. GOTO :End
  36.  
  37. :Dir3
  38. Dir /P *.%1
  39. GOTO :End
  40.  
  41. :Dir4
  42. Dir /P %1*.*
  43. IF EXIST *.%1*  GOTO :Dir5
  44. GOTO :End
  45.  
  46. :Dir5
  47. Dir /P *.%1*
  48. GOTO :End
  49.  
  50. :Dir6
  51. Dir /P %1\*.*
  52.  
  53. :End
  54.  
  55.  
  56.